
<include file="../header" />
<style type="text/css">
    .reqairs-box a {color:#000;}
</style>
<div class="wrapper">
    <div class="main">
        <div class="header text-center font-16">
            智能报修
            <div class="iconfont icon-zuo go_back"></div>
        </div>
        <div class="reqairs-box">
            <a class="reqairs flex" href="/Repaireast/RepaireastRepair/dailyRepair/modeName/dailyrepair">
                <div class="logo"><img src="/assets/repaireast/images/logo_2.png" alt=""></div>
                <div class="txt">
                    <p class="font-22">日常报修</p>
                    <p class="gray2">适用于办公区域报修</p>
                </div>
            </a>
            <if condition="$publicRepair eq 0">
                <div class="reqairs flex" id="public_repair">
                    <div class="logo"><img src="/assets/repaireast/images/logo_4.png" alt=""></div>
                    <div class="txt">
                        <p class="font-22">公共报修</p>
                        <p class="gray2">适用于公共区域报修</p>
                    </div>
                </div>
            </if>
            <if condition="$fastRepair eq 0">
                <a class="reqairs flex" href="/Repaireast/RepaireastRepair/fastRepair/modeName/fastrepair">
                    <div class="logo"><img src="/assets/repaireast/images/logo_6.png" alt=""></div>
                    <div class="txt">
                        <p class="font-22">快捷报修</p>
                        <p class="gray2">如维修工在您身旁，请此处提交报修</p>
                    </div>
                </a>
            </if>

        </div>
        <div class="flex add text-center Bottom-btn">
            <a href="#" class="bottom-btn">
                <span class="iconfont icon-baoxiu"></span>
                <p class="">我要报修</p>
            </a>
            <a href="/Repaireast/RepaireastRepair/history" class="bottom-btn">
                <span class="iconfont icon-wodebaoxiudan"></span>
                <p class="">历史报修</p>
            </a>
            <if condition="$accountId neq 38">
                <if condition="$hasPosition eq 1 OR $hasPosition eq 2">
                    <a href="/Repaireast/Repaireast/tips" class="bottom-btn">
                        <span class="iconfont icon-wodebaoxiudan"></span>
                        <p class="">我是维修人员</p>
                    </a>
                    <else/>
                    <a href="/Repaireast/Repaireast/applys" class="bottom-btn">
                        <span class="iconfont icon-wodebaoxiudan"></span>
                        <p class="">我是维修人员</p>
                    </a>
                </if>
            </if>
        </div>
    </div>
</div>
<script src="http://res.wx.qq.com/open/js/jweixin-1.2.0.js"></script>
<script src="/assets/repaireast/js/layer.js"></script>
<script src="/assets/repaireast/js/public.js"></script>
<!--<script src="/assets/repaireast/js/jweixin-1.2.0.js"></script>-->
<script type="text/javascript">
    wx.config({
        debug: false,
        appId: "{BEESCRM:$appid}",
        timestamp: "{BEESCRM:$timestamp}",
        nonceStr: "{BEESCRM:$noncestr}",
        signature: "{BEESCRM:$signature}",
        jsApiList: ['checkJsApi', 'scanQRCode','translateVoice']
    });
    wx.ready(function () {
        //调起扫码
        $('#public_repair').click(function(){
            wx.scanQRCode({
                needResult: 1, // 默认为0，扫描结果由微信处理，1则直接返回扫描结果，
                scanType: ["qrCode"], // 可以指定扫二维码还是一维码，默认二者都有
                success: function (res) {
                    //var result = res.resultStr; // 当needResult 为 1 时，扫码返回的结果
                    var id = res.resultStr;
                    
                    if(id.indexOf("public_id") > 0 ){
                    	var url = '/Repaireast/RepaireastRepair/publicRepair/public_id/'+id;
                    	window.location.href = url;
                    }else{
                    	fm.alert("请扫描正确的二维码！");
                    }
                }
            });
        });
    });
</script>
<include file="../footer" />